import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/detai_new_entity.g.dart';
import 'dart:convert';
export 'package:wanxiang_app/generated/json/detai_new_entity.g.dart';

@JsonSerializable()
class DetaiNewEntity {
	late int code;
	late String msg;
	late DetaiNewData data;

	DetaiNewEntity();

	factory DetaiNewEntity.fromJson(Map<String, dynamic> json) => $DetaiNewEntityFromJson(json);

	Map<String, dynamic> toJson() => $DetaiNewEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class DetaiNewData {
	late int id;
	@JSONField(name: "is_self")
	late int isSelf;
	@JSONField(name: "img_url")
	late String imgUrl;
	@JSONField(name: "add_time")
	late String addTime;
	late String title;
	late String content;
	@JSONField(name: "category_text")
	late String categoryText;
	@JSONField(name: "sell_price")
	late int sellPrice;
	@JSONField(name: "is_msg")
	late int isMsg;
	@JSONField(name: "is_indulge")
	late int isIndulge;
	@JSONField(name: "is_shoucang")
	late bool isShoucang;
	@JSONField(name: "channel_name")
	late String channelName;
	@JSONField(name: "channel_id")
	late String channelId;
	@JSONField(name: "category_id")
	late String categoryId;
	@JSONField(name: "phone_number")
	late String phoneNumber;
	@JSONField(name: "wx_number")
	late String wxNumber;
	@JSONField(name: "qq_number")
	late String qqNumber;
	@JSONField(name: "account_source")
	late String accountSource;
	@JSONField(name: "is_bargain")
	late String isBargain;
	@JSONField(name: "game_account")
	late String gameAccount;
	late String fields;
	@JSONField(name: "good_guid")
	late String goodGuid;
	@JSONField(name: "good_name")
	late String goodName;
	late String status;
	@JSONField(name: "role_text")
	late String roleText;
	late List<DetaiNewDataAlbums> albums;
	late List<DetaiNewDataExtended> extended;
	late List<DetaiNewDataCategory> category;

	DetaiNewData();

	factory DetaiNewData.fromJson(Map<String, dynamic> json) => $DetaiNewDataFromJson(json);

	Map<String, dynamic> toJson() => $DetaiNewDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class DetaiNewDataAlbums {
	late int id;
	@JSONField(name: "original_path")
	late String originalPath;

	DetaiNewDataAlbums();

	factory DetaiNewDataAlbums.fromJson(Map<String, dynamic> json) => $DetaiNewDataAlbumsFromJson(json);

	Map<String, dynamic> toJson() => $DetaiNewDataAlbumsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class DetaiNewDataExtended {
	@JSONField(name: "control_type")
	late String controlType;
	late String name;
	late String title;
	@JSONField(name: "item_option")
	late String itemOption;

	DetaiNewDataExtended();

	factory DetaiNewDataExtended.fromJson(Map<String, dynamic> json) => $DetaiNewDataExtendedFromJson(json);

	Map<String, dynamic> toJson() => $DetaiNewDataExtendedToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class DetaiNewDataCategory {
	late int id;
	late String title;
	@JSONField(name: "channel_id")
	late int channelId;
	@JSONField(name: "parent_id")
	late int parentId;

	DetaiNewDataCategory();

	factory DetaiNewDataCategory.fromJson(Map<String, dynamic> json) => $DetaiNewDataCategoryFromJson(json);

	Map<String, dynamic> toJson() => $DetaiNewDataCategoryToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}